<template>
  <div class="goods">
    <Headers :title="title" />
    <div class="color"></div>
    <div class="goodsitem">
      <!-- <BlusherRed/>
        <BlusherRed/>
        <BlusherRed/>
        <BlusherRed/> -->
      <template v-for="item in data">
        <BlusherRed :productData='item' />
      </template>
    </div>
  </div>
</template>

<script>

import Headers from "../components/changeHeader"
import BlusherRed from "../components/blusherRed"

export default {

  name: "goods",
  components: {

    Headers,
    BlusherRed

  },
  data() {
    return {
      data: [],
      title: ""
    }
  },
  created() {
    var flag = this.$axios.defaults.baseURL == "http://localhost:3000"
    var url = flag ? "/eyegel" : "/eyegel.json"
    this.$axios(url).then((res) => {
      //服务器请求的数据
      // this.$data.data=res.data
      //本地json请求的数据
      this.$data.data = res.data.data
    }).then((error) => {

    })
    if (this.$route.params.title) {
      sessionStorage.title = this.$route.params.title
    }
    this.$data.title = sessionStorage.title;
  }
}
</script>

<style scoped lang="less">
.color {
  height: 200/75rem;
  width: 100%;
  background: #ff406f;
}

.goodsitem {
  margin-top: -80/75rem;
}
</style>
